package com.neuedu.corejava.ch3.homework1;

public class Rhombus {

	public static void main(String[] args) {
		// 菱形
		for (int b = 1; b <= 5; b++) { // 上部分
			for (int c = 5 - b; c >= 0; c--) {
				System.out.print(" ");
			}
			for (int a = 1; a <= 2 * b - 1; a++) {
				System.out.print("*");
			}
			System.out.println();
		}
		for (int d = 4; d >= 1; d--) { // 下部分
			for (int c = 5 - d; c >= 0; c--) {
				System.out.print(" ");
			}
			for (int a = 2 * d - 1; a >= 1; a--) {
				System.out.print("*");
			}
			System.out.println();
		}

	}

}
